import 'amazeui/dist/css/amazeui';
import React, { Component } from 'react';
import {Grid, Col, Container} from 'amazeui-react';
import Navbar from './Navbar';
import DevTools from 'mobx-react-devtools';


export default class App extends Component {
  static defaultProps = {
    children: null,
    main: null,
    side: null
  };
  static contextTypes = {
    router: React.PropTypes.object
  };
  static propTypes = {
    children: React.PropTypes.node,
    main: React.PropTypes.element,
    side: React.PropTypes.element
  };
  render() {
    return (
      <div>
        <Container>
          <Navbar/>
        </Container>
        <Container style={{marginTop: '55px'}}>
          {this.props.children !== null ?
            this.props.children :
            (
              <Grid>
                <Col sm={2}>
                  {this.props.side}
                </Col>
                <Col sm={10}>
                  {this.props.main}
                </Col>
              </Grid>
            )
          }
        </Container>
        <DevTools />
      </div>
    );
  }
}
